package com.five.controller.reception;

import com.five.dao.impl.reception.ShowFacilityDaoImpl;
import com.five.dao.reception.ShowFacilityDao;
import com.five.util.PrintJsonData;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @Author: 王登峰
 * @Description:
 * @Date: 2020/11/18 19:13
 */
@WebServlet("/showfac")
public class ShowFacController extends HttpServlet {
    ShowFacilityDao showFacilityDao = new ShowFacilityDaoImpl();
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String name = req.getParameter("name");
        List<Map> select = showFacilityDao.select(name);
        PrintJsonData.printData(select,resp);
    }
}
